package org.tinygroup.channel.test.protocol.simple;

import org.tinygroup.channel.protocol.ProtocolTrans;
import org.tinygroup.channel.test.protocol.util.ConstantUtil;
import org.tinygroup.context.Context;

public class StringTrans implements
		ProtocolTrans<String, String, String, String> {

	public String transBizReq2ProReq(String bizRequest, Context context) {
		return context.get(ConstantUtil.KEY) + " : " + bizRequest;
	}

	public String transProReq2BizReq(String proRequest, Context context) {
		return context.get(ConstantUtil.KEY) + " : " + proRequest;
	}

	public String transProRes2BizRes(String proResponse, Context context) {
		return proResponse;
	}

	public String transBizRes2ProRes(String bizResponse, Context context) {
		return bizResponse;
	}

}
